<%@ page import="MySql.Goods" %>
<%@ page import="java.util.List" %><%--
  Created by IntelliJ IDEA.
  User: 浅汐
  Date: 2021/1/9
  Time: 15:23
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="Head.jsp"%>
<%!
    int i;
%>
<div class="center" style="height: 400px">
    <%
        List<Goods> goods=(List<Goods>)session.getAttribute("cart");
        for (i=0;i<goods.size();i++)
        {

    %>
    <div>
        <h2>
            <%=goods.get(i).getTitle()%>
        </h2>
        <div>
            <%=goods.get(i).getPrice()%>
        </div>
        <a href="deletecartgood.go?id=<%=i%>">删除</a>
    </div>

    <%
        }
    %>
</div>


<%--<c:forEach items="${(sessionScope.getAttribute(cart))}" var="good">--%>
<%--    <h2>${good.getTitle()}</h2>--%>
<%--    <h3>${good.getPrice()}</h3>--%>
<%--</c:forEach>--%>
<%@ include file="foot.jsp"%>
